from typing import FrozenSet

from pydantic import Field

from common.base_models import InfectionMonkeyBaseModel


class RDPOptions(InfectionMonkeyBaseModel):
    agent_binary_upload_timeout: float = Field(
        default=30.0,
        gt=0.0,
        le=100.0,
        description=(
            "The timeout (in seconds) for uploading the Agent binary to the target machine."
        ),
    )
    domains: FrozenSet[str] = Field(
        default=frozenset(("WORKGROUP",)),
        frozen=True,
        description="The Windows domains to try when logging in to the target machine.",
    )
    login_timeout: float = Field(
        default=60.0,
        gt=0.0,
        le=100.0,
        description=(
            "The maximum time (in seconds) to wait for the desktop to load after logging in."
        ),
    )
    rdp_connect_timeout: float = Field(
        default=15.0,
        gt=0.0,
        le=100.0,
        description="The maximum time (in seconds) to wait for a response on an RDP connection.",
    )
